//
//  Global.m
//  Ghac 4S
//
//  Created by apple on 11-8-23.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "Global.h"
void KLog(NSString* target, ...)
{
//    va_list arg_ptr;
//    va_start(arg_ptr, target);
//    NSString* tmpTarget;
//    while(YES)
//    {
//        tmpTarget = va_arg(arg_ptr, NSString*);
//        if (tmpTarget)
//        {
//            NSLog(@"%@", tmpTarget);
//        }
//        else
//        {
//            break;
//        }
//    }
//    va_end(arg_ptr);
    
}


@implementation Global
@synthesize updateTimeDelta;
- (id)init
{
    self = [super init];
    if (self) {
        // Initialization code here.
    }
    
    return self;
}

+(Global *)mainInstance
{
    if (g_mainGlobal == nil)
    {
        g_mainGlobal = [[Global alloc] init];
    }
    return g_mainGlobal;
}
+(NSDictionary *)globalConfigDic
{
    if (g_config == nil)
    {
        g_config = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Property List" ofType:@"plist"]];
    }
    return g_config;
}
+(id<MainViewSwitchAction>)mainRootController
{
    return (id<MainViewSwitchAction>)[([[UIApplication sharedApplication].windows objectAtIndex:0]) rootViewController];
}
+(NSString *)BTN_L_NEWS
{
    return @"news";
}
+(NSString *)BTN_L_CONTACT
{
    return @"contact";
}
+(NSString *)BTN_L_LOCATION
{
    return @"location";
}
+(NSString *)BTN_L_PRICE
{
    return @"parts price";
}
+(NSString *)BTN_L_REPAIR
{
    return @"parts repair";
}
+(NSString *)BTN_L_QA
{
    return @"q&a";
}
+(NSString *)SHOP_DETAIL_VIEW
{
    return @"shopDetail";
}

@end
